import React from 'react';
import styles from './index.module.scss'

interface PropsInterface {
  // 是否允许hover
  hover: boolean,
  className: string
  children: JSX.Element,
  onClick: () => void
}

const Cell = function(props: PropsInterface) {

  return <li onClick={ props.onClick } className={ `${styles['con-table-view-cell']} ${props.className} ${props.hover ? 'w-hover-glow w-pointer' : ''}` }>
    { props.children }
  </li>
}

Cell.defaultProps = {
  hover: true,
  onClick: () => {}
};

export default Cell